package entity;

import com.google.code.morphia.annotations.Entity;
import com.google.code.morphia.annotations.Id;
import com.google.code.morphia.annotations.Indexed;

import java.util.ArrayList;
import java.util.Date;
import org.bson.types.ObjectId;

/**
 * 
 * @author xuanhung2401
 */
@Entity
public class News {

	@Id
	private ObjectId id;	
	@Indexed
	private String url;// real link.
	private String title;
	@Indexed
	private String alias;// by title replace u.t.f 8.
	private String imgDescription;// first image from their site.
	private String description;
	private String content;
	@Indexed
	private String author;// author from their site.
	@Indexed
	private Date doc;// date of create from their site.
	@Indexed
	private Date dog;// date of get from my site.
	@Indexed
	private String category;
	@Indexed
	private String subCategory;
	@Indexed
	private boolean complete;// already had content. complete = true.	
	@Indexed
	private String source;// from what web site.
	private String sourceName;// web site name.
	private ArrayList<String> relateUrls = new ArrayList<String>();// relate
	@Indexed																// link.
	private ArrayList<String> tagged = new ArrayList<String>();
	private ArrayList<String> otherTags = new ArrayList<String>();
	@Indexed
	private int status;// getting (status = 2), complete (status = 1), only link
						// (status = 0).
	@Indexed
	private int index;// link from their site index page ( meaning latest news).
						// If this is latest, index = 1. Else index = 0.	
	private boolean solrIndex;
	@Indexed
	private int countView;	// +=1 when user view detail.
			
	public int getCountView() {
		return countView;
	}

	public void setCountView(int countView) {
		this.countView = countView;
	}

	public boolean isSolrIndex() {
		return solrIndex;
	}

	public void setSolrIndex(boolean solrIndex) {
		this.solrIndex = solrIndex;
	}

	public int getIndex() {
		return index;
	}

	public void setIndex(int index) {
		this.index = index;
	}

	public int isStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	public String getImgDescription() {
		return imgDescription;
	}

	public void setImgDescription(String imgDescription) {
		this.imgDescription = imgDescription;
	}

	public String getSourceName() {
		return sourceName;
	}

	public void setSourceName(String sourceName) {
		this.sourceName = sourceName;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public ArrayList<String> getOtherTags() {
		return otherTags;
	}

	public void setOtherTags(ArrayList<String> otherTags) {
		this.otherTags = otherTags;
	}

	public ArrayList<String> getTagged() {
		return tagged;
	}

	public void setTagged(ArrayList<String> tagged) {
		this.tagged = tagged;
	}

	public String getAlias() {
		return alias;
	}

	public void setAlias(String alias) {
		this.alias = alias;
	}

	public String getAuthor() {
		return author;
	}

	public void setAuthor(String author) {
		this.author = author;
	}

	public String getCategory() {
		return category;
	}

	public void setCategory(String category) {
		this.category = category;
	}

	public boolean isComplete() {
		return complete;
	}

	public void setComplete(boolean complete) {
		this.complete = complete;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public Date getDoc() {
		return doc;
	}

	public void setDoc(Date doc) {
		this.doc = doc;
	}

	public Date getDog() {
		return dog;
	}

	public void setDog(Date dog) {
		this.dog = dog;
	}

	public ObjectId getId() {
		return id;
	}

	public void setId(ObjectId id) {
		this.id = id;
	}

	public ArrayList<String> getRelateUrls() {
		return relateUrls;
	}

	public void setRelateUrls(ArrayList<String> relateUrls) {
		this.relateUrls = relateUrls;
	}

	public String getSource() {
		return source;
	}

	public void setSource(String source) {
		this.source = source;
	}

	public String getSubCategory() {
		return subCategory;
	}

	public void setSubCategory(String subCategory) {
		this.subCategory = subCategory;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}
}
